john's calculator is a simple, powerful, and fast keyboard-based calculator. Expressions are entered as by hand, using either the keyboard or calculator buttons. Standard editing commands like cut, copy, and paste are fully supported. Variables can be used to simplify expressions.
For users of previous versions:
• The file format used in previous versions has been changed slightly in version 1.0. This may lead to the loss of the first line of a file created by a previous version when read by version 1.0.
• The icons used by john's calculator have been changed in version 1.0. If you have already installed an old version of john's calculator to use the new icons you need to rebuild you Macintoshes Desktop (hold +option at startup).
• The round & truncate functions now round/truncate to a given number of decimal places.
Installation:
Copy the file "john's calculator" to where you want it. That's it.
How to use john's calculator:
• Enter an expression on a line by itself.
• Press the ENTER key to evaluate the line, regardless of where the cursor is in the line.
Note that you must press the ENTER key to evaluate an expression - the RETURN key inserts a carriage return but does not evaluate.
You can return to a previous line, edited it, press the ENTER key and the changed line will be evaluated.
Some examples:
2(2+3) enter 2(2+3) then press the ENTER key
10 the line is evaluated and the value returned on the next line
2e2^2 this is the same as 200^2 (2e2 is 2x10^2)
40000
5log(2^5) this is the same as 5(log(2^5))
7.52575
5log2^5 this is the same as 2((log2)^5)
0.01236
10->x store 10 in the variable named x
10
20->y store 20 in the variable named y
20
2x+3y this is the same as 2(10)+3(20)
80
-1-9->x now store -1-9 in x
-10
2x+3y now this is the same as 2(-10)+3(20)
40
:5->x store 5 in x, ":" stops the value from being shown
:2->y store 2 in y
x^2+y^2 this is the same as 5^2+2^2
29
{5->x evaluate lines until "}" or end of file is reached
2x^2+3x+2 cursor must be in line containing "{"
} " }" must be the first (non-space) character on the line
67 value returned is that of last line evaluated
{ similar example
2->x
3x+2->y use the RETURN key to enter other lines
2y
}
16
:{1->y
2y->x
} ":" stops the value from being shown
Now we could return to the line ":5->x", change the 5 to a 0 and press the ENTER key. This would change the value of x to 0.
If we then return to the line "x^2+y^2" and press the ENTER key, 4 is returned (0^2+2^2).
1+2
3
ans enter ans then press the ENTER key
3 the last answer, 3, is returned
1+ans this is the same as 1+3 since 3 was the last answer
4
5-2
3
+2 this is the same as 3+2 since the previous answer is used when not
5 enough arguments are given on a line
^3 this is the same as 5^3
125
60! 60! is too big for decimal display, so it's shown in scientific display
8.32099e+81 regardless of radio button setting
Most operations which take two arguments can be enter as opn(arg1,arg2) or arg1opnarg2. Usually one of the two forms is much clearer.
examples:
gcd(10,2) and 10gcd2 both return 2 (the greatest common divisor)
10^2 and ^(10,2) both return 100
There is a complete list of operations below.
Buttons:
Input buttons:
All operations are available on calculator input buttons.
Radio buttons:
• Mode group - sets mode to radians or degrees
• Display group - sets calculator to display answer in decimal or scientific notation form
• Level group - sets which level of input buttons is shown
Enter button:
Same as pressing the ENTER key.
Menus:
The "File" and "Edit" menus work in the usual fashion.
Variables menu:
Show - shows all variables and values
Clear All - clears all variables (so no variables are stored)
The variable menu is not available unless a variable is defined.
Decimal menu:
Floating - use floating decimal in displaying answer
Fixed - use fixed decimal in displaying answer
0-6 - number of decimal places to use in displaying answer
Evaluation Errors:
• If john's calculator can't understand an operation it will highlight the first thing it doesn't understand (and beep at you).
• If there are not enough arguments for the operations in an expression an alert box will pop
up and say so.
• If a function is given a bad argument an alert box will pop up and hiss at you.
Gotchas:
• You must use the ENTER key, not the RETURN key, to evaluate a line.
• Rules about variable names.
- Variable names are not case sensitive. So "x" and "X" are the same variable names.
- Variable names can contain spaces except at the beginning. So "x1" and "x1 " are
different variables. But "2-> x" would store 2 in the variable named "x".
- Variable names can be any length. So "my variable" is a valid variable name.
- Just about any character is valid in variable name. So "#$-" is ok.
• When evaluating a line john's calculator checks for variable names before anything else.
You can use a variable named "log" if you want but this carries obvious risks.
• Up to 100 variables can be stored. You can clear all variables using the "Clear All"
command of the "Variables" menu or clear individual variables using the "<-" operator.
• The calculator only ask if you want to save changes if you are working with a named
file.
• ":" must be the first (non-blank) character in a line.
• ":" can't appear between "{" and "}".
• In multiline eval the cursor must be in line containing "{" when the ENTER key is pressed.
• "{" can be preceeded only by ":" (and blanks) in a line.
• "}" must be the first (non-blank) character in a line.
• In decimal display mode answers are rounded after 19 digits.
Operations:
Here is a listing of the operations john's calculator understands.
+ addition
- subtraction
* multiplication
/ division
^ exponentiation
ln natural logarithm
log logarithm base 10
lognx logarithm base n of x
lognx(2,16) returns 4
() parentheses
, separates arguments
sin sine
cos cosine
tan tangent
cot cotangent
ans last answer returned
sqrt square root
% percent
5%20 returns 25 (since 5 is 25% of 20)
1/x reciprocal
// modulus (remainder)
16//7 returns 2 (since the remainder for 16/7 is 2)
^(1/) arbitrary root
16^(1/4) returns 2 (since the principle 4th root of 16 is 2)
{} multiline evaluation
: don't return value (must be at start of line)
-> store value in variable
<- clear variable name
<-x returns value in x and clears x from storage
r2d change radians to degrees
arcSin arcSine
arcCos arcCosine
arcTan arcTangent
arcCot arcCotangent
d2r change degrees to radians
mPn permutations of n things taken from m things
mPn(10,2) or 10mPn2 returns 90
mCn combinations of n things taken from m things
mCn(10,2) or 10mCn2 returns 45
! factorial
gcd greatest common divisor
gcd(200,60) returns 20
lcm least common multiple
pi π
e the natural base e
round round to given decimal place
round(2.514, 0) returns 3
trunc truncates to given decimal place
trunc(2.514, 0) returns 2
abs absolute value
csc coSecant
sec secant
sinh hyperbolic sine
cosh hyperbolic cosine
tanh hyperbolic tangent
Preferences file:
The position of the percenter window and the "Decimal" menu settings are stored in the "percenter Preferences" file and used the next time percenter is launched.
This file is located in the "Preferences" folder by default. The "Preferences" folder is normally located in the "System" folder.
Known bugs:
None (oh boy).
Version History:
0.0b - first beta release (22 Jan 1996)
0.1b - 2nd beta release (24 Feb 1996)
fixed some problems with file handling
cleaned-up resizing
cleaned/fixed some internals
1.0 - (24 April 1996)
added "Decimal" menu
added use of preference file
added multiline evaluation
added check for bad function arguments
round now rounds to given decimal place (rather than always to 0 decimal places)
redesigned icons
cleaned-up zoom
Standard Stuff:
Although copyrighted, john's calculator is freeware and may be distributed freely as long as this file is included. However, ownership of and interest in this software shall remain with John Wilhelm.
This software is provided “as is” without warranty of any kind. The entire risk as to the results of using this software lies entirely with the user.
In no event shall the author be liable for any damages arising out of the use or inability to use this software.